//
// Created by Castle on 2025/10/27.
//

using namespace std;
#include <iostream>

int main() {
    int scores[10]{11,12,13,14,15,16,17,18,19,20};

    // Pointer arithmetic notation
    int * p1 { scores + 0 };
    int * p2 { scores + 8 };


    cout << "p2 - p1 : " << p2 - p1 << endl;
    cout << "p1 - p2 : " << p1 - p2 << endl;

    ptrdiff_t pos_diff = p2 - p1;
    ptrdiff_t neg_diff = p1 - p2;
    cout << "pos_diff : " << pos_diff << endl;
    cout << "neg_diff : " << neg_diff << endl;

    return 0;
}